package com.nelson.musicplayer

import android.app.Application
import android.content.Context

/**
 * @author nelson
 * @since 2020-07-25
 */
class MusicPlayerApplication : Application() {

    override fun attachBaseContext(base: Context?) {
        super.attachBaseContext(base)
        instance = this
    }

    companion object {
        lateinit var instance: MusicPlayerApplication
            private set
    }
}

internal val appContext: Context
    get() {
        return MusicPlayerApplication.instance.applicationContext
    }

